﻿@model AP.Framework.Infrastructure.Entities.cms_Link
@Html.ValidationSummary(true)
<script type="text/javascript">
    $(function () {
        $('#file_upload').uploadify({
            'swf': '@Url.Content("~/Areas/Admin/Content/uploadify/uploadify.swf")',
            'buttonText': '添加图片...',
            'cancelImg': '@Url.Content("~/Areas/Admin/Content/uploadify/uploadify-cancel.png")',
            'uploader': '/Admin/AdminLinks/Upload',
            'auto': true,
            'onUploadSuccess': function (file, data, response) {
                eval("data=" + data);
                $("#ImageUrl").val(data.msg);
                $("#linkLogImage").attr("src", data.msg);
            }
        });
        $("#linkLogImage").attr("src", $("#ImageUrl").val());
    });      
</script>
<br />
<table id="tradeRecordsIndex" class="ui-table">
    <tbody>
        <tr>
            <td class="info">
                标题
            </td>
            <td>
                @Html.TextBoxFor(model => model.Title, new { @placeholder = "标题" })
                @Html.ValidationMessageFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <td class="info">
                合作用户
            </td>
            <td>
                @Html.TextAreaFor(model => model.UserName, new { @placeholder = "合作用户", style = "width:40% ;height:50px;" })
                @Html.ValidationMessageFor(model => model.UserName)
            </td>
        </tr>
        <tr>
            <td class="info">
                联系电话
            </td>
            <td>
                @Html.TextBoxFor(model => model.UserTel, new { @placeholder = "联系电话", style = "width:40% ;" })
                @Html.ValidationMessageFor(model => model.UserTel)
            </td>
        </tr>
        <tr>
            <td class="info">
                邮箱
            </td>
            <td>
                @Html.TextBoxFor(model => model.Email, new { @placeholder = "邮箱", style = "width:40% ;" })
                @Html.ValidationMessageFor(model => model.Email)
            </td>
        </tr>
        <tr>
            <td class="info">
                网站/网址
            </td>
            <td>
                @Html.TextBoxFor(model => model.SiteUrl, new { @placeholder = "网站/网址", style = "width:40% ;" })
                @Html.ValidationMessageFor(model => model.SiteUrl)
            </td>
        </tr>
        <tr>
            <td class="info">
                图片/Logo
            </td>
            <td>
                @Html.TextBoxFor(model => model.ImageUrl, new { @placeholder = "图片/Logo" })
                <input type="file" name="file_upload" id="file_upload" />
                <img id="linkLogImage" alt="logo" src="" style="" />
                @Html.ValidationMessageFor(model => model.ImageUrl)
            </td>
        </tr>
        <tr>
            <td class="info">
                排序号
            </td>
            <td>
                @Html.TextBoxFor(model => model.Sequence, new { @placeholder = "排序号" })
                @Html.ValidationMessageFor(model => model.Sequence)
            </td>
        </tr>
        <tr>
            <td class="info">
                是否隐藏/锁定
            </td>
            <td>
                @Html.CheckBoxFor(model => model.IsDisable)
                @Html.ValidationMessageFor(model => model.IsDisable)
            </td>
        </tr>
        <tr>
            <td class="info">
            </td>
            <td>
                <div class="submit-time ui-button ui-button-sorange">
                    <button type="submit" class="ui-button-text">
                        保 存</button>
                </div>
            </td>
        </tr>
    </tbody>
</table>
